package l1j.server.server.command.executor;

import java.util.StringTokenizer;

import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_SkillIconGFX;
import l1j.server.server.serverpackets.S_SystemMessage;

public class L1SkillIcon implements L1CommandExecutor {
	public static L1CommandExecutor getInstance() {
		return new L1SkillIcon();
	}

	private L1SkillIcon() {
	}

	@Override
	public void execute(final L1PcInstance pc, final String cmdName, final String arg) {
		try {
			final StringTokenizer st = new StringTokenizer(arg);
			byte type=1;

			if(st.hasMoreTokens()){
				type = Byte.parseByte(st.nextToken());
				}
			pc.sendPackets(new S_SkillIconGFX(type,1000));
		} catch (final Exception e) {
			pc.sendPackets(new S_SystemMessage(".speed 指令錯誤！"));
		}
	}

}
